package personal.vap.route.tracker.server;

public class Coordinate {
  public double longitude;
  public double lattitude;
  public double altitude;
  
  @Override
  public String toString() {
    return "Coordinate [longitude=" + longitude + ", lattitude=" + lattitude + ", altitude=" + altitude + "]";
  }
  
  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;
    temp = Double.doubleToLongBits(altitude);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(lattitude);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(longitude);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
  }
  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    Coordinate other = (Coordinate) obj;
    if (Double.doubleToLongBits(altitude) != Double.doubleToLongBits(other.altitude))
      return false;
    if (Double.doubleToLongBits(lattitude) != Double.doubleToLongBits(other.lattitude))
      return false;
    if (Double.doubleToLongBits(longitude) != Double.doubleToLongBits(other.longitude))
      return false;
    return true;
  }
}
